KAAV-3492 Validoinnin nopeutus ja Seuraavat elementit eivät siirry eteenpäin, kun elementtiä siirretään menneisyydestä#658
Merged
henrihaapalasiili merged 40 commits intodevelopmentfrom Feb 19, 2026
Conversation
649d619 to
72d1690
Compare
- Move validateProjectTimetable dispatch from VisTimelineGroup drag handlers to EditProjectTimetableModal componentDidUpdate - Validation now triggers after checkForDecreasingValues cascade completes - Pass attributeData directly to validateProjectTimetable action to avoid stale selector values - Add guard to prevent duplicate validation requests - Update saga to use passedAttributeData and compute diff with getChangedAttributeData Fixes issue where validation was running before cascaded date values were synced to the form, causing incorrect corrections.
- Remove unused validateProjectTimetable import from VisTimelineGroup - Validation now triggers from EditProjectTimetableModal after cascade completes - Saga uses passed attributeData and computes diff vs initial values - Remove unused 'initialize' import from projectSaga Ensures single PATCH request per date drag and proper handling of cascaded date values before backend validation.
…rt, L and XL have reversed order in ehdotus phase: lautakunta first, nähtävilläolo last bug fix
…nd cascade runs for the new dates
…esilläolo is confirmed (#660) Frontend changes: - Updated generateConfirmedFields.js to include phase START boundary fields in confirmed_fields when the first esilläolo of that phase is confirmed - Added phaseStartMap mapping phase names to their start boundary field identifiers - Phase END boundaries are NOT protected (user can still add more esilläolos) This ensures that when a user confirms the first esilläolo date of a phase, the phase start date becomes locked and won't be recalculated during save.
- Updated getChangedValues to return isAdd and isRemove separately - Added validation trigger for group removal (isRemove) to recalculate phase boundaries - This ensures phase dates are properly recalculated when esilläolo or lautakunta groups are deleted
- Add hasEsillaolo check to limit esillaoloOff logic to periaatteet/luonnos phases - Fix adjustDeadlineData || operator to explicit undefined check - Fix test key typo tarkistettuehdotusvaihe -> tarkistettu_ehdotusvaihe
- objectUtil.js: Replace hardcoded gaps (22, 5) with DB values - timeUtil.js: Remove hardcoded gap overrides for maaraaika/nahtavilla - Add projectVisibilityUtils.js for centralized visibility logic - Add unit tests for objectUtil, timeUtil, projectReducer
- Extract runAndGetDaysDiff() helper for dateDifference tests - Use test.each() for parameterized test cases - Reduce dateDifference tests from ~150 to ~70 lines - Fix projectReducer.test.js expected date (timezone handling)
…gainst just-updated value, Only push timeline values forward if there's an actual overlaps
… adjacent phases bug fix
… groups Skip cascade for non-boundary deadlines across phases. Only phase boundaries cascade from previous phase. Fixes oas_esillaolo_aineiston_maaraaika incorrectly using periaatteet predecessor instead of oasvaihe_alkaa_pvm.
- Prevents stale dates from reappearing when group is re-added
…ds caused unexpected date jumps.
… stale date overlap
…ctual previous index
…g initial distance with validation and user would need to move it fix
bbc9d8c to
a08bd23
Compare
… change käynnistys dates
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



-Fix race condition in timeline validation
Move validateProjectTimetable dispatch from VisTimelineGroup drag handlers
to EditProjectTimetableModal componentDidUpdate
Validation now triggers after checkForDecreasingValues cascade completes
Pass attributeData directly to validateProjectTimetable action to avoid
stale selector values
Add guard to prevent duplicate validation requests
Update saga to use passedAttributeData and compute diff with
getChangedAttributeData
-Validation logic change to make validation faster.
-Modified timeutil test to use dynamic dates.
-Adding triggers validation.
-Trigger validation when removing deadline groups
Updated getChangedValues to return isAdd and isRemove separately
Added validation trigger for group removal (isRemove) to recalculate phase boundaries
This ensures phase dates are properly recalculated when esilläolo or lautakunta groups are deleted
Fixes issue where validation was running before cascaded date values
were synced to the form, causing incorrect corrections.
-KAAV-3517 fix
Fix esilläolo OFF handling and adjustDeadlineData
Use DB distance values instead of hardcoded fallbacks
initial_distance ?? distance_from_previous ?? 0-When deleting phases the phase lengths leaves a gap between adjacent phases bug fix.